ArtDialog Error: document. compatMode = "BackCompat Error cause, document. compatmode
The Error message "artDialog Error: document. compatMode =" BackCompat "is returned when you use artDialog today.
You can set it after checking the online instructions Or change XHTML4.0 to 1.0.
But the error still exists.
Then I reference the jquery-1.10.2.min.js and the error disappears.
PS: I sent an error message
the old rendering methods (such as: Microsoft's IE). In this way, Quircks mode and standars mode are generated on the browser rendering, and there is a common browser for both rendering methods. Backcompat corresponds to quirks modeCss1compat corresponds to strict modeBackcompat: Standard compatibility mode is off.Css1compat: Standard compatibility mode is turned on. in standars mode: Element true width = margin-left + border-left-width + padding-
attributes refer to the content portion of the element plus the visual area occupied by the padding, excluding the space occupied by the border and scrollbars.(Figure one clientheight and ClientWidth properties)Therefore, the clientheight and ClientWidth properties of the document element represent the size of the Web page.function GetViewport () {if (Document.compatmode = = "Backcompat") {return {Width:document.body.clientWidth,Height:document.body.
the top of the pageScrollTop =Window.pageyoffset; } Else if(typeofDocument.compatmode! = ' undefined ' document.compatmode! = ' Backcompat ') {scrolltop=Document.documentElement.scrollTop; } Else if(typeofDocument.body! = ' undefined ') {scrolltop=Document.body.scrollTop; } returnscrolltop;}Note: IE's rendering of box models is very different in standards mode and Quirks mode , and the interpretation of box models under standards mode is the same
page has the ClientHeight and ClientWidth properties. These two attributes refer to the content portion of the element plus the visual area occupied by the padding, excluding the space occupied by the border and scrollbars.(Figure one clientheight and ClientWidth properties)Therefore, the clientheight and ClientWidth properties of the document element represent the size of the Web page.function GetViewport () {if (Document.compatmode = = "Backcompat"
plus the visual area occupied by the padding, excluding the space occupied by the border and scrollbars.(Figure one clientheight and ClientWidth properties)Therefore, the clientheight and ClientWidth properties of the document element represent the size of the Web page.function GetViewport () {if (Document.compatmode = = "Backcompat") {return {Width:document.body.clientWidth,Height:document.body.clientHeight}} else {return {Width:document.documentEle
It is important to use JS to achieve, do not need to add any content in HTML, CSS, and even do not need pictures, as long as the reference JS can be. and fully compatible with IE6. Due to consideration of compatibility issues
The realization principle is that we get the current IE height and then scroll up
The former mainstream browser is better than IE for browser standard support, such as Chrome, Firefox and Safari. For the latter, you can take the Window object's pageYOffset property to the
size
Each element on the webpage has the clientHeight and clientWidth attributes. These two attributes refer to the visual area occupied by the element content plus the padding, excluding the space occupied by border and the scroll bar.
(ClientHeight and clientWidth attributes)
Therefore, the clientHeight and clientWidth attributes of the document element represent the page size.
The Code is as follows:
Function getViewport (){If (document. compatMode = "
obtained. These two attributes indicate the size of the element content plus the padding size, but do not include the space occupied by border and the scroll bar.
(Figure 2 clientHeight and clientWidth attributes)
Therefore, the clientHeight and clientWidth attributes of the document element represent the relative size of the webpage.
Function getViewport (){If (document. compatMode = "BackCompat "){Return {Width: document. body. clientWidth,Height:
ClientWidth properties of the document element represent the size of the Web page.function GetViewport () {if (Document.compatmode = = "Backcompat") {return {Width:document.body.clientWidth,Height:document.body.clientHeight}} else {return {Width:document.documentElement.clientWidth,Height:document.documentElement.clientHeight}}}The GetViewport function above can return the height and width of the browser window. When used, there are three places to b
(Document.compatmode = = "Backcompat") {return {Width:document.body.clientWidth,Height:document.body.clientHeight}} else {return {Width:document.documentElement.clientWidth,Height:document.documentElement.clientHeight}}} The GetViewport function above can return the height and width of the browser window. When used, there are three places to be aware of:1) This function must be completed after the page is loaded to run, or the Document object has no
obtained. These two attributes indicate the size of the element content plus the padding size, but do not include the space occupied by border and the scroll bar.
(Figure 2 clientHeight and clientWidth attributes)
Therefore, the clientHeight and clientWidth attributes of the document element represent the relative size of the webpage.
Function getViewport (){If (document. compatMode = "BackCompat "){Return {Width: document. body. clientWidth,Height:
the visual area occupied by the padding, excluding the space occupied by the border and scrollbars.(Figure one clientheight and ClientWidth properties)Therefore, the clientheight and ClientWidth properties of the document element represent the size of the Web page.function GetViewport () {if (Document.compatmode = = "Backcompat") {return {Width:document.body.clientWidth,Height:document.body.clientHeight}} else {return {Width:document.documentElement.
clientHeight and clientWidth attributes, so that the relative size of the webpage can be obtained. These two attributes indicate the size of the element content plus the padding size, but do not include the space occupied by border and the scroll bar.
(ClientHeight and clientWidth attributes)
Therefore, the clientHeight and clientWidth attributes of the document element represent the relative size of the webpage.
Function getViewport (){If (document. compatMode = "
the visual area occupied by the padding, excluding the space occupied by the border and scrollbars.(Figure one clientheight and ClientWidth properties)Therefore, the clientheight and ClientWidth properties of the document element represent the size of the Web page.function GetViewport () { if (Document.compatmode = = "Backcompat") { returnE LSE { return {width:document.documentElement.clientWidth, height:document . Documentelement.clientheight}
attributes, and you can use them to get the relative size of the page. The size represented by these two properties refers to the content of the element plus the size of the padding, but does not include the space occupied by the border and scroll bars.
(Figure II ClientHeight and ClientWidth properties)
Therefore, the clientheight and clientwidth attributes of the document element represent the relative size of the Web page.
function GetViewport () {if (Document.compatmode = = "
refer to the content portion of the element plus the visual area occupied by the padding, excluding the space occupied by the border and scrollbars.
(Figure ClientHeight and ClientWidth properties)
Therefore, the clientheight and clientwidth attributes of the document element represent the size of the Web page.
Copy Code code as follows:
function GetViewport () {
if (Document.compatmode = = "Backcompat") {
return {
Width:docu
test results, do not test Consider IE8 and below.
2, Safari because the device limit is not tested, in addition it is the same as the chrome kernel, the reliability of the standard support is less than the poor.
3, the old version of the Chrome,firefox,opera also because the limitations of the device can not be tested, but from the browser to the standard support level, these three browsers in the early version of the standards of the standard of the consortium are relatively regular, coupled
Today, I saw the document. compatmode attribute. I usually don't know much about the document mode, so I tested this attribute.
There are two types of document. compatmode values: "backcompat" and "css1compat ".
Backcompat indicates the standard compatibility mode is disabled.
Css1compat indicates that the standard compatibility mode is enabled.
The so-called standard compatibility mode is not enabl
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.